Show:

ia.ImageLayer Class

Extends ia.LayerBase
Module: ia

The base class for Image layers - ags and wms.

Constructor

ia.ImageLayer

()

Methods

_mapEventHandler

(
  • event
)
private

Handles when to carry out hit tests.

Parameters:

addCanvases

()

Adds drawing canvases for the layer when the layer is shown. This method was introduced to fix a bug a chrome when multiple canvases were affecting rendering. It basically reduces the number of unused canvases which are taking up memory.

addEventListener

(
  • eventType
  • fnc
  • obj
)

Add an event listener.

Parameters:

  • eventType String

    The type of event to listen for.

  • fnc Function

    The function to call when the event occurs.

  • obj Object

    An optional parent object.

clear

()

Clears all canvases in the layer.

createCanvas

() HTML Canvas

Creates a new canvas.

Returns:

HTML Canvas: The canvas.

dispatchEvent

(
  • event
)

Dispatch an event to the listeners.

Parameters:

  • event Object

    The event object.

draw

(
  • ctx
)

Draws the image without reloading it.

Parameters:

  • ctx HTML Canvas Context

    The context to render to.

getUrl

()

Returns the required url.

Returns:

The url for retrieving the layer info.

getVisible

() Boolean

Gets the visibility of the layer.

Returns:

Boolean: true/false.

loadSource

()

Loads the source data.

removeCanvases

()

Removes drawing canvases for the layer when the layer is hidden. This method was introduced to fix a bug a chrome when multiple canvases were affecting rendering. It basically reduces the number of unused canvases which are taking up memory.

removeListener

(
  • obj
)

Removes all event listeners for the given object.

Parameters:

  • obj Object

    The object.

render

()

Inherited from ia.LayerBase but overwritten in ia\maps\layers\ImageLayer.js:67

Renders the image.

setMap

(
  • map
  • map
)

Sets the map and canvas for the layer.

Parameters:

  • map ia.Map

    The map.

  • map HTML Element

    The container.

setVisible

(
  • value
)

Sets the visibility of the layer.

Parameters:

  • value Boolean

    true/false.

Properties

bBox

ia.BoundingBox

The bounding box for the layer.

canvas

HTML Canvas

The canvas associated with this layer.

context

HTML Canvas Context

The canvas context associated with this layer.

id

String

The id of the layer.

Default: ""

interactive

Boolean

Is selection and highlighting switched on.

Default: false

isLoaded

Boolean

Indicates whether the layer is loaded.

Default: false

layers

String

Determines which layers appear on the exported map.

Default: ""

map

ia.Map

The map associated with this layer.

name

String

The name of the layer.

Default: ""

params

String

Any additional params.

Default: ""

showDataTips

Boolean

Are data tips displayed.

Default: trueE

showInLayerList

Boolean

Should the layer be displayed ina layer list.

Default: false

showLabels

Boolean

Show labels.

Default: false

srs

String

The spatial reference system.

Default: ""

url

String

The url.

Default: ""

version

String

The version number.

Default: ""